package cn.sise.edu.crm.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

@Setter
@Getter
public class SystemDictionaryItem {
    private Long id;
    private Long parentId;
    private String title;
    private Integer sequence;
    private SystemDictionary systemDictionary;
    public String getJsonData(){
        Map<String,Object> map = new HashMap<>();
        map.put("id",this.id);
        map.put("parentId",this.parentId);
        map.put("title",this.title);
        map.put("sequence",this.sequence);
        map.put("systemDictionaryId",this.systemDictionary.getId());
        map.put("systemDictionaryTitle",this.systemDictionary.getTitle());
        return JSON.toJSON(map).toString();
    }

}